package com.nowcoder.community;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * @author AnYang
 * @Description 部署项目，一个程序不能有两个main方法，所以需要重新配置一个程序入口，
 * @Version 1.0.0
 * @Date 2024/2/16
 */
public class CommunityServletInitializer extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        // 运行程序，声明配置文件为CommunityApplication
        return application.sources(CommunityApplication.class);
    }
}
